package com.io;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;

public class copy_picture4 {
  public static void main(String[] args) throws Exception{
    //
      FileInputStream fis = null;
      BufferedInputStream bis = null;
      FileOutputStream fos = null;
      BufferedOutputStream bos = null;
      try{
          fis = new FileInputStream("/Users/edz/Desktop/BY2151-zmq/src/main/java/文稿/1.jpg");
          bis = new BufferedInputStream(fis);
          fos = new FileOutputStream("/Users/edz/Desktop/BY2151-zmq/src/main/java/文稿/5.jpg");
          bos = new BufferedOutputStream(fos);
          //字节缓冲流默认是 beyt[8000+]
          int temp;
          while ((temp = bis.read()) != -1){
              bos.write(temp);
          }
          bos.flush();
      }finally{
          bis.close();
          fis.close();
          bos.close();
          fos.close();
      }
  }
}
